import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';

import '../components/PageWrap.dart';

class ProgressIndicatorLn extends StatefulWidget {
  const ProgressIndicatorLn({super.key});

  @override
  State<ProgressIndicatorLn> createState() => _ProgressIndicatorLnState();
}

class _ProgressIndicatorLnState extends State<ProgressIndicatorLn> {
  @override
  Widget build(BuildContext context) {
    return PageWrap(
      title: "进度指示器",
      children: <Widget>[
        SizedBox(
          height: 50,
        ),
// 模糊进度条(会执行一个动画)
        LinearProgressIndicator(
          backgroundColor: Colors.grey[200],
          valueColor: AlwaysStoppedAnimation(Colors.blue),
        ),
        SizedBox(
          height: 50,
        ),
//进度条显示50%
        LinearProgressIndicator(
          backgroundColor: Colors.grey[200],
          valueColor: AlwaysStoppedAnimation(Colors.blue),
          value: .5,
        ),
        SizedBox(
          height: 50,
        ),
        // 模糊进度条(会执行一个旋转动画)
        CircularProgressIndicator(
          backgroundColor: Colors.grey[200],
          valueColor: AlwaysStoppedAnimation(Colors.blue),
        ),
        SizedBox(
          height: 50,
        ),
//进度条显示50%，会显示一个半圆
        CircularProgressIndicator(
          backgroundColor: Colors.grey[200],
          valueColor: AlwaysStoppedAnimation(Colors.blue),
          value: .5,
        ),
        SizedBox(
          height: 50,
        ),
      ],
    );
  }
}
